﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Net;
using System.Configuration;

namespace KioskosJugandoLimpio.Denuncias
{
    public partial class Video : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {

            if (Request.QueryString["ajax"] == "1")
            {
                if (Request.QueryString["guid"] != null)
                {
                    Response.Clear();
                    int videoid = Classes.SQL.fnExec("EXEC addVideo '" + Request.QueryString["guid"] + "'");
                    Response.Write(videoid.ToString());
                    Response.Write("<script>parent.location='/';</script>");
                    
                    Response.End();
                }
            }
            
        }

        private bool InternetIsAlive()
        {
            try
            {
                System.Net.IPHostEntry host = System.Net.Dns.GetHostEntry("http://player.nimbb.com/");
                return true;
            }
            catch
            {
                return false;
            }
        }

    }
}